<%--
  Created by IntelliJ IDEA.
  User: Administration
  Date: 2022/6/2
  Time: 8:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>学生</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <style>
        table{
            border-collapse:collapse;
        }
        table tr th, table tr td {
            border:1px solid black;
        }
    </style>
</head>
<body>
<%
    Object st = request.getSession().getAttribute("studentList");
    if (st == null) {
        response.sendRedirect("/queryStudent");
    }
%>
<h2>学生信息表</h2>
<table>
    <tr>
        <th>姓名</th>
        <th>性别</th>
        <th>手机号</th>
        <th>地址</th>
        <th>班级</th>
        <th>学号</th>
        <th>javaee成绩</th>
    </tr>
    <c:forEach var="student" items="${studentList}">
        <tr>
            <td>${student.name}</td>
            <td>${student.sex}</td>
            <td>${student.mobilePhone}</td>
            <td>${student.address}</td>
            <td>${student.className}</td>
            <td>${student.studentID}</td>
            <td>${student.score}</td>
        </tr>
    </c:forEach>

</table>

</body>
</html>
